gdksurface-win32.c: Fix resizing
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 5 Aug 2020 07:14:44 +0000 (15:14 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 5 Aug 2020 08:23:14 +0000 (16:23 +0800)
Use gdk_surface_get_geometry() to get the correct x and y coordinates of the
window that we are resizing, so that the window does not reposition itself
automatically at the top-left corner at resizing as we to used hard-code the x
and y coordinates to 0.

gdk/win32/gdksurface-win32.c

index bcee5ce24223dffcc1a453422692412b4c6cae9b..5a61919d9509dd6c27589964dcad1a2225bef8fb 100644 (file)
@@ -217,7 +217,7 @@ _gdk_win32_get_window_client_area_rect (GdkSurface *window,
 {
   int x, y, width, height;
 
-  x = y = 0;
+  gdk_surface_get_geometry (window, &x, &y, NULL, NULL);
   width = gdk_surface_get_width (window);
   height = gdk_surface_get_height (window);
   rect->left = x * scale;